package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Result;
import org.jsola.hr.dto.NoticeRuleSettingDTO;
import org.jsola.hr.vo.HrNoticeGroupListVO;

import java.util.List;

/**
 * 消息通知
 *
 * @author wcl
 */
@Api(tags = "hr-消息通知")
public interface INoticeControllerAPI {

    /**
     * 查询用工单位所有通知分组详情
     *
     * @param companyId 公司id
     * @return 通知分组
     */
    @ApiOperation(value = "查询用工单位所有通知分组详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "公司id", paramType = "query")
    })
    Result<List<HrNoticeGroupListVO>> listAllByCompanyId(String companyId);

    /**
     * 查询所有分类
     * @return page
     */
    @ApiOperation(value = "查询所有通知分组")
    Result<List<HrNoticeGroupListVO>> listAllGroup();

    /**
     * 新增或更新消息提醒规则设置
     *
     * @param noticeRuleSettingDTO 消息提醒规则设置新增实体
     * @return 消息提醒规则设置展示对象
     */
    @ApiOperation(value = "新增或更新消息提醒规则设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "noticeRuleSettingDTO", dataType = "NoticeRuleSettingDTO", value = "新增消息提醒规则设置", paramType = "body")
    })
    Result<String> saveOrUpdateNoticeRuleSetting(NoticeRuleSettingDTO noticeRuleSettingDTO);

    /**
     * 开启消息提醒规则设置
     *
     * @param id 消息提醒规则id
     * @return 修改数量
     */
    @ApiOperation(value = "开启消息提醒规则设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", dataType = "Long", value = "消息提醒规则id", paramType = "path")
    })
    Result<Integer> openNoticeRuleSetting(Long id);

    /**
     * 关闭消息提醒规则设置
     *
     * @param id 消息提醒规则id
     * @return 修改数量
     */
    @ApiOperation(value = "关闭消息提醒规则设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", dataType = "Long", value = "消息提醒规则id", paramType = "path")
    })
    Result<Integer> closeNoticeRuleSetting(Long id);

    /**
     * 甲方端首页消息通知统计
     * @return 统计结果
     */
    @ApiOperation(value = "甲方端首页消息通知统计")
    Result<List<HrNoticeGroupListVO>> jfHomePageNotice();

}
